﻿using System;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LikeProxy
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
            {
                string strException = string.Format("{0}发生系统异常。\r\n{1}\r\n\r\n\r\n", DateTime.Now, e.ExceptionObject.ToString());
            };
            TaskScheduler.UnobservedTaskException += (sender, e) =>
            {
                e.SetObserved();
                string error = e.Exception.Message;
                // 阻止程序崩溃的方法有2种
            };
            Application.Run(new MainForm());


        }


    }

}
